package com.jintian.smart.demo.mapper;

import com.jintian.smart.base.api.demo.entity.GoodsEntity;
import com.jintian.smart.base.api.demo.form.GoodsQueryForm;
import com.jintian.smart.base.api.demo.view.GoodsVO;
import org.beetl.sql.core.page.PageResult;
import org.beetl.sql.mapper.BaseMapper;
import org.beetl.sql.mapper.annotation.Mapper;
import org.beetl.sql.mapper.annotation.Param;
import org.beetl.sql.mapper.annotation.SqlResource;

import java.util.List;

/**
 * 商品
 */
@Mapper
@SqlResource("demo.Goods")
public interface GoodsMapper extends BaseMapper<GoodsEntity> {
    /**
     * 分页 查询商品
     */
    PageResult<GoodsVO> query(@Param("queryForm") GoodsQueryForm query);

    /**
     * 批量更新删除状态
     */

    void batchUpdateDeleted(@Param("goodsIdList") List<Long> goodsIdList, @Param("deletedFlag") Integer deletedFlag);
}
